import request from '@/utils/request'

// 查询销售单列表
export function listSalesList(query,salesId) {
  return request({
    url: '/sales/salesList/list',
    method: 'get',
    params: query
  })
}

// 查询销售单详细
export function getSalesList(salesId) {
  return request({
    url: '/sales/salesList/' + salesId,
    method: 'get'
  })
}

// 新增销售单
export function addSalesList(data) {
  return request({
    url: '/sales/salesList',
    method: 'post',
    data: data
  })
}

// 修改销售单
export function updateSalesList(data) {
  return request({
    url: '/sales/salesList',
    method: 'put',
    data: data
  })
}

// 删除销售单
export function delSalesList(salesId) {
  return request({
    url: '/sales/salesList/' + salesId,
    method: 'delete'
  })
}

// 查询计划编码列表
export function codeListSelect() {
  return request({
    url: '/sales/salesList/codeList',
    method: 'get'
  })
}

// 获取销售单选择框列表
export function salesListSelect() {
  return request({
    url: '/sales/salesList/salesList',
    method: 'get'
  })
}
